/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 19182
 * Date: 2025-07-03
 * Time: 21:29
 */
public class student implements Cloneable{
    public String name;
    public int age;
    public Money m;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        student tmp = (student)super.clone();
        tmp.m = (Money) this.m.clone();
        return tmp;
    }

    public student(String name, int age){
        this.name = name;
        this.age = age;
        this.m = new Money(1);
    }

    @Override
    public String toString() {
        return "student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", m=" + m +
                '}';
    }
}
